package edu.BillME.gui;

import edu.uta.BillMeApp.R;

import edu.uta.BillMeApp.RecentBills;
import edu.uta.BillMeApp.RecentPayments;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
/* @auther Siddharth Patel & Susan Foster */
public class RecentHistory extends TabActivity{
	
	String getWN;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.history);
	    
	    Bundle gotBundle=getIntent().getExtras();
        getWN=gotBundle.getString("wN");

	    TabHost tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Reusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab
	    

	    // Create an Intent to launch an Activity for the tab (to be reused)
	    Bundle bundle = new Bundle();
		bundle.putString("wN",getWN);
	    intent = new Intent().setClass(this, RecentBills.class);
	    intent.putExtras(bundle);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec("Recent Bills").setIndicator("Recent Bills")
	                  .setContent(intent);
	    
	    tabHost.addTab(spec);
	    Bundle bundle1 = new Bundle();
		bundle1.putString("wN",getWN);
		 intent = new Intent().setClass(this, RecentPayments.class);
		//intent = new Intent().setClass(this, RecentPaymentHistory.class);
	    intent.putExtras(bundle);
	    spec = tabHost.newTabSpec("Recent Payments").setIndicator("Recent Payments").setContent(intent);
	    tabHost.addTab(spec);

	    tabHost.setCurrentTab(2);
	}
	
}
